for x in range(len(string)): |
hash = hash[:8] |
return hash |
i = ord(string[x]) |
def simpleHash(string): |
s = s * i |
hash = str(s) |
s = 1 |
    for x in range(len(string)): |
    hash = hash[:8] |
    return hash |
        i = ord(string[x]) |
def simpleHash(string): |
        s = s * i |
    hash = str(s) |
    s = 1 |
1 | def simpleHash(string): |
2 |     s = 1 |
3 |     for x in range(len(string)): |
4 |         i = ord(string[x]) |
5 |         s = s * i |
6 |     hash = str(s) |
7 |     hash = hash[:8] |
8 |     return hash |
s = 1 |
hash = hash[:8] |
hash = hash * 8 |
for x in range(len(string)): |
if len(hash) < 8: |
i = ord(string[x]) |
def mediumHash(string): |
return hash |
s = s * i |
hash = str(s) |
    s = 1 |
    hash = hash[:8] |
        hash = hash * 8 |
    for x in range(len(string)): |
    if len(hash) < 8: |
        i = ord(string[x]) |
def mediumHash(string): |
    return hash |
        s = s * i |
    hash = str(s) |
1 | def mediumHash(string): |
2 |     s = 1 |
3 |     for x in range(len(string)): |
4 |         i = ord(string[x]) |
5 |         s = s * i |
6 |     hash = str(s) |
7 |     if len(hash) < 8: |
8 |         hash = hash * 8 |
9 |     hash = hash[:8] |
10 |     return hash |
s = 1 |
s = s * i |
if len(hash) < 8: |
hash = "" |
new = s[:3] |
i = ord(string[x]) |
char = chr(new) |
while len(s) > 0: |
if new < 33: |
hash = hash + char |
s = str(s * len(string)) |
hash = hash[:8] |
s = s [3:] |
new = int(new) % 95 + 32 |
return hash |
def complexHash(string): |
for x in range(len(string)): |
new = 33 |
hash = hash * 8 |
    s = 1 |
        s = s * i |
    if len(hash) < 8: |
    hash = "" |
        new = s[:3] |
        i = ord(string[x]) |
        char = chr(new) |
    while len(s) > 0: |
        if new < 33: |
        hash = hash + char |
    s = str(s * len(string)) |
    hash = hash[:8] |
        s = s [3:] |
        new = int(new) % 95 + 32 |
    return hash |
def complexHash(string): |
    for x in range(len(string)): |
            new = 33 |
        hash = hash * 8 |
1 | def complexHash(string): |
2 |     s = 1 |
3 |     for x in range(len(string)): |
4 |         i = ord(string[x]) |
5 |         s = s * i |
6 |     s = str(s * len(string)) |
7 |     hash = "" |
8 |     while len(s) > 0: |
9 |         new = s[:3] |
10 |         s = s [3:] |
11 |         new = int(new) % 95 + 32 |
12 |         if new < 33: |
13 |             new = 33 |
14 |         char = chr(new) |
15 |         hash = hash + char |
16 |     if len(hash) < 8: |
17 |         hash = hash * 8 |
18 |     hash = hash[:8] |
19 |     return hash |